import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
  routes: [
     {
       path:"/",
       redirect:'/login' //重定向默认访问localhost:8080的时候跳转到localhost:8080/#/index 页面
     },
    {
      path: '/login',
      name: 'login',
      component: (resolve) => require(['@/pages/login'], resolve),
    },
    {
      path:"/home",
      name:"login",
      component:(resolve) => require(['@/pages/home'], resolve),
      children:[
        {
          path:"/index",
          name:"index",
          component:(resolve) => require(['@/pages/index/index'], resolve),
        },
        {
          path:"/user",
          name:"user",
          component:(resolve) => require(['@/pages/user/user'], resolve),
        },
        {
          path:"/indexTab",
          name:"indexTab",
          component:(resolve) => require(['@/pages/indexTab/indexTab'], resolve),
        },
        {
          path:"/leadIndex",
          name:"leadIndex",
          component:(resolve) => require(['@/pages/leadIndex/leadIndex'], resolve),
        },
        {
          path:"/leadPrj",
          name:"leadPrj",
          component:(resolve) => require(['@/pages/leadPrj/leadPrj'], resolve),
        },
        {
          path:"/performance",
          name:"performance",
          component:(resolve) => require(['@/pages/performance/performance'], resolve),
        },
        {
          path:"/achievement",
          name:"achievement",
          component:(resolve) => require(['@/pages/achievement/achievement'], resolve),
        },
        {
          path:"/user/project",
          name:"user_project",
          component:(resolve) => require(['@/pages/personal/project'], resolve),
        },
        {
          path:"/user/personal",
          name:"user_personal",
          component:(resolve) => require(['@/pages/personal/personal'], resolve),
        },
        {
          path:"/user/personal2",
          name:"user_personal2",
          component:(resolve) => require(['@/pages/personal/personal2'], resolve),
        },
        {
          path:"/argument",
          name:"argument",
          component:(resolve) => require(['@/pages/argument/argument'], resolve),
        }
        
      ]
    }
  ]
})
